#ifndef EOCHEART_CAPTURE_H
#define EOCHEART_CAPTURE_H
#include "stm32g4xx_hal.h"

typedef struct
{
  uint32_t Cnt_Start;
  uint32_t Cnt_End;
  uint8_t State;
  uint8_t Complete;
  uint64_t Cnt_Period;
  uint64_t timcnt;

} Capture_TypeDef;

void Capture_End(Capture_TypeDef *cap);
void Capture_Start(Capture_TypeDef *cap);
uint32_t Capture_GetValue(Capture_TypeDef *cap);

extern Capture_TypeDef Heart;

#endif //EOCHEART_CAPTURE_H
